package com.woniu113.junk.order.service;

import com.alipay.api.AlipayApiException;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.woniu113.junk.order.client.dto.AdminInfoDTO;
import com.woniu113.junk.order.dto.AllOrderDTO;
import com.woniu113.junk.order.dto.FindDTO;
import com.woniu113.junk.order.dto.findAdminIdDTO;
import com.woniu113.junk.order.model.OrderInfo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.woniu113.junk.order.param.orderInfo.*;

import java.io.IOException;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 蜡笔没了小新
 * @since 2024年10月16日
 */
public interface OrderInfoService extends IService<OrderInfo> {
    void appointment(AddOrderInfoParam param);
    void acceptOrder(String orderNum, Integer adminId);
    void acceptOrderForAdmin(String orderNum, Integer adminId);
    void updateTime(UpdateTimeParam param);
    void cancel(String orderNum, Integer userId, String cancelReason);
    void cancelByRider(String orderNum, Integer adminId, String cancelReason);
    String confirm(OkOderInfoParam param) throws IOException, AlipayApiException;
    Page<OrderInfo> findAppointment(FindAppointmentParam param);
    Double queryWeight(String orderNum, Integer typeId);
    Page<AdminInfoDTO> findSuitableRider(FindSuitableRiderParam param);
    List<AdminInfoDTO> findAdmin(FindByStationParam param);
    void orderTaking(String orderNum, int admin);
    AllOrderDTO findAll(AllOrderParam param, int offset);
    AllOrderDTO findAllByRiderId(AllOrderParam param, Integer offset, Integer admin);
    FindDTO find(FindParam param);
    AllOrderDTO findOrderByStationMasterId(AllOrderParam param, Integer offset, Integer adminId);
    boolean orderCheck(String orderNum);
    void updateOrder(String orderNum);
}
